sunxi: DRAM: fix H3 DRAM size display on aarch64
authorAndre Przywara <[email protected]>
Mon, 2 Jan 2017 11:48:44 +0000 (11:48 +0000)
committerJagan Teki <[email protected]>
Wed, 4 Jan 2017 15:37:43 +0000 (16:37 +0100)
Fix the output of the DRAM size on AArch64 SPLs.

Signed-off-by: Andre Przywara <[email protected]>
Reviewed-by: Alexander Graf <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
arch/arm/mach-sunxi/dram_sun8i_h3.c

index 1311edaf325b69a358275dc9687bc991864b0793..9f7cc7fd4ccdcec499519ed0d89dd0f8687bc7cc 100644 (file)
@@ -664,6 +664,6 @@ unsigned long sunxi_dram_init(void)
        mctl_auto_detect_dram_size(&para);
        mctl_set_cr(&para);
 
-       return (1 << (para.row_bits + 3)) * para.page_size *
+       return (1UL << (para.row_bits + 3)) * para.page_size *
                                                (para.dual_rank ? 2 : 1);
 }